const express = require("express")
const app = express()
app.listen(8080,()=>{
    console.log("服务器已启动");
})
app.get("/:id/:hd",(req,res)=>{
   console.log("沙雕");
   res.send({name:"zs",age:"20",gender:"男"})
   //req.query可以获取客户端发送过来的查询参数，req.query默认是个空对象
   console.log(req.query);
   //req.params可以动态匹配路径后的值 req.param默认是个空对象
   console.log(req.params);
})
app.post("/user",(req,res)=>{
res.send("请求失败")
})
